// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** getIteration id获取迭代详情 GET /api/iteration */
export async function getIterationUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getIterationUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseIterationVo_>('/api/iteration', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** addIteration 新建迭代 POST /api/iteration/add */
export async function addIterationUsingPost(
  body: API.AddIterationRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/iteration/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** getTaskCount 获取迭代任务统计信息 GET /api/iteration/taskCount */
export async function getTaskCountByIterIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTaskCountByIterIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseTaskCountVo_>('/api/iteration/taskCount', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** updateIteration 更新迭代 PUT /api/iteration/update */
export async function updateIterationUsingPut(
  body: API.UpdateIterationRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/iteration/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
